import axios from './http'
import base from './base'
import qs from 'qs'
const common = {
  // 代品卷
  discount (params) {
    return axios.get(`${base.pro}/api/coupon/lists`, {
      params
    })
  },
  collect (params) {
    return axios.get(`${base.pro}/api/member/collections`, {
      params
    })
  },
  share (params) {
    return axios.get(`${base.pro}/api/profile/myshare`, {
      params
    })
  },
  // 绑定手机
  phone (params) {
    return axios.post(`${base.pro}/api/member/bindPhone`, qs.stringify(params))
  },
  // 发送短信
  message (params) {
    return axios.post(`${base.pro}/api/sms/send`, qs.stringify(params))
  },
  buy (params) {
    return axios.get(`${base.pro}/api/order/buyNow`, { params })
  },
  discountList (params) {
    return axios.get(`${base.pro}/api/coupon/lists`, { params })
  }
}

export default common
